<!DOCTYPE html>
<!--
Copyright 2011 Google Inc. All Rights Reserved.

Use of this source code is governed by a BSD-type license.
See the COPYING file for details.
-->

<style type="text/excss">
  #foo {
    !candystripe!
  }
</style>

<script src="../../excss.js" explicit=true></script>
<script>

var g = CSS.Grammar;
var CandyStripeGrammar = {
  declaration: g.first(g.g('candystripe'), 
                       [g.g('property'), g.SS, ':', g.SS, g.g('values')]),
  candystripe: '!candystripe!'
};

g.patch(CandyStripeGrammar);

CSS.CallbackRegistry.patch({
  candystripe: function(s) {
    this.currentRule = { 
        declaration: "background: -webkit-repeating-linear-gradient(" + 
                     "left, red, red 7px, white 10px, white 17px, red 20px)" 
    };
    this.currentItem().rules.push(this.currentRule);
  }
});

window.CSS.run();

</script>
<script src="../tests.js"></script>

<div id="foo" expect="background-image: -webkit-repeating-linear-gradient(
  left, red, red 7px, white 10px, white 17px, red 20px)">Foo</div>
